package com.lhsy.djcloud.service;

import com.lhsy.djcloud.entity.Department;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wangzw
 * @since 2020-09-14
 */
public interface DepartmentService extends IService<Department> {

    /**
     * 获取所有党租住
     * @param tenantId
     * @return
     */
    List<Department> getAllDepartments(Integer tenantId);

    /**
     * 查询 fid
     * @param fid
     * @return
     */
    List<Department> selectByPid(Integer fid);

    int delete(Integer id);

    /**
     * 获取当前部门下的最子级部门
     * @param id
     * @param tenantId
     * @return
     */
    List<Department> selectChildrenDept(Integer tenantId,Integer id);


    List<Department> getChildrenDept(Integer tenantId,String params);

    List<Department> getByLevel(Integer tenantId, Integer level);

    List<Department> selectNoSelf(Integer userId,Integer tenantId);
    List<Department> selectTreeList(Integer id,Integer tenantId);

}
